<script setup lang='ts'>
  import { onMounted, reactive, ref } from 'vue';
  import { statisticsApi } from '@/api/controller';
  import { ToastError, Toastloading } from '@/utils/public';
  const action = reactive({
    list:[] as any[],
  })
  const getList = async()=> {
    const loading = Toastloading()
    const res = await statisticsApi.recharge()
    loading.close()
    const { data=[] } = res
    action.list = data
  }
  onMounted(()=>{
    getList()
  })
</script>

<template>
  <div class="xm-content">
    <el-table
      class="xm-main xm-TableCenter"
      :data="action.list"
      border>
      <el-table-column min-width="120" prop="create_time" label="日期" />
      <el-table-column min-width="120" sortable prop="usernums" label="首充用户数" />
      <el-table-column min-width="140" sortable prop="ticket_nums" label="领取免费许愿卡人数" />
      <el-table-column min-width="140" sortable prop="ticket_use_count" label="使用免费许愿卡人数" />
      <el-table-column min-width="160" sortable prop="use_diamon_count" label="首充用户许愿池消耗钻石数" />
      <el-table-column min-width="140" sortable prop="gold_count" label="兑换金豆数量" />
    </el-table>
  </div>
</template>